<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>堆叠顺序</title>
    <style>
        /*
            可以通过z-index属性控制最外层的元素是谁
            其值是一个数字,最大的在外面
         */
        .c1 {
            width: 200px;
            height: 100px;
            background-color: red;
            position: absolute;
            z-index: 4;
        }
        .c2 {
            width: 200px;
            height: 100px;
            background-color: green;
            position: absolute;
            z-index: 2;
        }
        .c3 {
            width: 200px;
            height: 100px;
            background-color: blue;
            position: absolute;
            z-index: 3;
        }
    </style>
</head>
<body>
<div class="c1"></div>
<div class="c2"></div>
<div class="c3"></div>
</body>
</html>